
package com.nancy.ioc.BeanFactoryPostProcessor.importtest;

import com.nancy.ioc.Bean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;


@Configuration
public class MyImportConfiguration {

    @Autowired
    private Environment environment ;

    @org.springframework.context.annotation.Bean("selectorImportBean")
    public Bean bean(){
        String beanFieldName2 =  environment.getProperty("bean.field.name2") ;
        return new Bean(beanFieldName2) ;
    }

}
